package com.hm.scala

import java.util.Date
import java.util.ArrayList

object MyTuple {

  def getUserInfo(id: Int): Tuple3[Int, String, Date] = {
    //对象封装
    return Tuple3[Int, String, Date](1, "Tom", new Date());
  }

  def queryUserList(t: Tuple3[Int, String, Date]): java.util.List[Tuple3[Int, String, Date]] = {

    //集合对象封装
    var list = new ArrayList[Tuple3[Int, String, Date]]();
    list.add(t);
    

    return list;
  }

  def main(args: Array[String]): Unit = {
    var t = (1, 232, "rwgrter", 232.121);
    println(t._1 + ";" + t._3)

    val t2 = Tuple3(1, "aa", 2);

    println(t2)

    println(getUserInfo(1))

    println(queryUserList(getUserInfo(1)))
  }
}